package com.example.demo1;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Main3Activity extends Activity {

	private Button btn1;
	private Button btn2;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main3);
		
		init();
	}

	private void init() {
		btn1 = (Button)findViewById(R.id.main3btn1);
		btn2 = (Button)findViewById(R.id.main3btn2);
		
		btn1.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(Main3Activity.this,MainActivity.class);
				intent.putExtra("ss", 1234563333);
				setResult(33, intent);
				finish();
//				setResult(33);
//				finish();
			}
		});
		btn2.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(Main3Activity.this,Main2Activity.class);
				startActivity(intent);
				finish();
			}
		});
	}
}
